Skip to content

feat(mcp): register loopover_check_improvement_potential stdio tool - #7954

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:feat/mcp-stdio-improvement-potential-7759
Closed

feat(mcp): register loopover_check_improvement_potential stdio tool#7954
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:feat/mcp-stdio-improvement-potential-7759

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

  • Register loopover_check_improvement_potential as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts.
  • Proxy POST /v1/lint/improvement-potential (same endpoint the existing improvement-potential CLI already uses).
  • In-process InMemoryTransport coverage so Codecov instruments the .ts bin.
  • Tool count pin 89 → 90.

Closes #7759

Test plan

  • mcp-cli-improvement-potential-stdio.test.ts (register + POST proxy)
  • Tool count pin 89 → 90

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 21, 2026 22:23
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@002a864). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7954   +/-   ##
=======================================
  Coverage        ?   11.38%           
=======================================
  Files           ?        1           
  Lines           ?     2188           
  Branches        ?      838           
=======================================
  Hits            ?      249           
  Misses          ?     1921           
  Partials        ?       18           
Flag Coverage Δ
shard-1 11.38% <100.00%> (?)
shard-2 0.00% <0.00%> (?)
shard-3 0.00% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/loopover-mcp/bin/loopover-mcp.ts 11.38% <100.00%> (ø)

Add the missing local stdio surface for the existing remote tool and
improvement-potential CLI (JSONbored#7759), proxying POST /v1/lint/improvement-potential
with in-process Codecov coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-21 22:32:43 UTC

3 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This registers `loopover_check_improvement_potential` as a stdio MCP tool that proxies the already-existing `POST /v1/lint/improvement-potential` route (the same route the CLI's `improvement-potential` command already calls per `loopover-mcp.js`), following the exact pattern of the adjacent `loopover_check_slop_risk` tool. The input schema, descriptor, and registration wiring are consistent with sibling tools in the file, the tool-count pin is correctly bumped 89→90 in both places that assert it, and the added test exercises the real proxy path (registers, calls, asserts the captured POST url/method and response body) rather than fabricating a scenario.

Nits — 5 non-blocking
  • The external scan flags `test/unit/mcp-cli-improvement-potential-stdio.test.ts:32` as a potential leaked secret, but it's just the literal test fixture value `"in-process-token"` assigned to `LOOPOVER_API_TOKEN` for the in-process harness — not a real credential, safe to ignore.
  • `packages/loopover-mcp/bin/loopover-mcp.ts:1875`'s `(input: any) =>` handler uses `any` like every other `registerStdioTool` callback in this file, so it's consistent with the existing convention rather than a new deviation.
  • The `.max(400)`/`.max(2000)` bounds in the new schema (loopover-mcp.ts:709-737) are copy-pasted literals rather than named constants, but they match the exact bounds already used by `checkSlopRiskShape` just above, so this is purely a pre-existing style choice, not something this PR introduces.
  • If a shared `checkImprovementPotentialShape`-style constant module doesn't already exist, consider extracting the repeated `.max(400)`/`.max(2000)` bounds shared with `checkSlopRiskShape` into named constants to cut duplication (not required for this PR).
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7759
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 399 registered-repo PR(s), 170 merged, 36 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 399 PR(s), 36 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_check_improvement_potential following the exact sibling pattern, proxies the same POST /v1/lint/improvement-potential endpoint used by the existing CLI command (no duplicated HTTP logic), and uses stdioToolDescription for its description, with matching test coverage and tool-count updates.

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, Ruby, Svelte, TypeScript, Markdown, MDX
  • Official Gittensor activity: 399 PR(s), 36 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (PR #7956)
  • Related work: Titles/paths share 8 meaningful terms. (PR #7955)
  • Related work: Titles/paths share 7 meaningful terms. (PR #7950)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflicts:

This branch has conflicts that must be resolved
Use the [web editor](https://github.com/JSONbored/loopover/pull/7954/conflicts) or the command line to resolve conflicts before continuing.

test/unit/mcp-tool-rename-aliases.test.ts

@JSONbored JSONbored closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register loopover_check_improvement_potential as a local stdio MCP tool

2 participants